<template>
  <view class="buyoutDescription">
    <view class="banner">
      <!-- <img src="../../static/icones/banner1.png" alt="" /> -->
      <div class="bannermain">
        <view class="banner-header">买断尾款说明</view>
        <view class="banner-text">· 买断尾款：指您买断商品所需支付的金额</view>
        <view class="banner-text">· 预计买断尾款 = 买断价 - 实付租金 </view>
        <view class="banner-text"
          >· 优惠金额仅限抵扣租金，不能用于抵扣买断价格</view
        >
      </div>
    </view>
    <div class="mian">
      <div class="content bg-white">
        <div class="goods-info box flex-row">
          <div class="left justify-center items-center">
            <img
              :src="info.coverUrl || changeUrl"
              alt=""
              class="img"
              mode="aspectFit"
            />
          </div>
          <div class="right flex-col">
            <span class="title ellipsis_1">{{
              info.goodsName || "苹果13Promax 5G手机全新国行全"
            }}</span>
            <!-- <view class="text">
              <span class="taocaies">套餐：</span>
              <span class="taocai">{{
                info.specName ||
                "最多四十个字最多四十个字最多四十个字最最多四十个字最多四十个字最多四十个字最多四十个字最多四十"
              }}</span>
            </view> -->
            <div class="rang-date spec flex">
              <span class="name">租期：</span
              >{{ info.startEndTimeString || "" }}
              <span class="num spec">X{{ info.num || "1" }}</span>
            </div>
            <div class="all-rang items-center flex">
              <span class="name">总租金：</span>￥<span class="rangnum">{{
                info.allRentFee || 0
              }}</span
              >（{{ info.rentStage || "" }}期）
            </div>
            <div class="all-rang items-center flex">
              <span class="name">买断价:</span>￥<span class="rangnum">{{
                info.allRentFee || 0
              }}</span
              >（{{ info.rentStage || "" }}期）
            </div>
          </div>
        </div>
      </div>
      <div class="contentes">
        <view class="table-header">预计买断价格表</view>
        <uni-table emptyText="暂无更多数据">
          <!-- 表头行 -->
          <uni-tr>
            <uni-th width="42" align="center">期数</uni-th>
            <uni-th width="160" align="center">租数</uni-th>
            <uni-th width="71" align="center">月租金</uni-th>
            <uni-th width="71" align="center">买断尾款</uni-th>
          </uni-tr>
          <!-- 表格数据行 -->
          <uni-tr v-for="(item, index) in tableData" :key="index">
            <uni-td>{{ item.num }}</uni-td>
            <uni-td>{{ item.timer }}</uni-td>
            <uni-td>{{ item.yue }}</uni-td>
            <uni-td>{{ item.buyout }}</uni-td>
          </uni-tr>
          <!-- <uni-tr>
            <uni-td>9/12</uni-td>
            <uni-td>2022/08/11-2022/09/10</uni-td>
            <uni-td>1000.00元</uni-td>
            <uni-td>3000.00元</uni-td>
          </uni-tr>
          <uni-tr>
            <uni-td>9/12</uni-td>
            <uni-td>2022/08/11-2022/09/10</uni-td>
            <uni-td>1000.00元</uni-td>
            <uni-td>3000.00元</uni-td>
          </uni-tr>
          <uni-tr>
            <uni-td>9/12</uni-td>
            <uni-td>2022/08/11-2022/09/10</uni-td>
            <uni-td>1000.00元</uni-td>
            <uni-td>3000.00元</uni-td>
          </uni-tr> -->
        </uni-table>
      </div>
    </div>
  </view>
</template>

<script>
import uniTable from "../../../uni-table_1.2.1/components/uni-table/uni-table.vue";
import uniTr from "../../../uni-table_1.2.1/components/uni-tr/uni-tr.vue";
import uniTd from "../../../uni-table_1.2.1/components/uni-td/uni-td.vue";
import uniTh from "../../../uni-table_1.2.1/components/uni-th/uni-th.vue";
export default {
  components: {
    uniTable,
    uniTr,
    uniTd,
    uniTh,
    /* 其它组件定义 */
  },
  data() {
    return {
      changeUrl: "../../static/icones/pic1.png",
      tableData: [
        {
          num: "9/10",
          timer: "2022/08/11-2022/09/10",
          yue: "1000.00元",
          buyout: "3000.00元",
        },
        {
          num: "9/10",
          timer: "2022/08/11-2022/09/10",
          yue: "1000.00元",
          buyout: "3000.00元",
        },
        {
          num: "9/10",
          timer: "2022/08/11-2022/09/10",
          yue: "1000.00元",
          buyout: "3000.00元",
        },
        {
          num: "9/10",
          timer: "2022/08/11-2022/09/10",
          yue: "1000.00元",
          buyout: "3000.00元",
        },
        {
          num: "9/10",
          timer: "2022/08/11-2022/09/10",
          yue: "1000.00元",
          buyout: "3000.00元",
        },
      ],
    };
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
.buyoutDescription {
  width: 100vw;
  //   height: 100vh;
  //   overflow: scroll;
  background-color: #f5f5f5;
  // padding: 12px;
  .banner {
    width: 100%;
    height: 245px;
    background: url("../../static/icones/banner1.png") no-repeat center;
    background-size: cover;
    // img {
    //   width: 100%;
    //   height: 100%;
    //   object-fit: contain;
    .bannermain {
      width: 100%;
      height: 100%;
      padding: 20px 25px;
      .banner-header {
        height: 70px;
        line-height: 70px;
        color: #fff;
        font-size: 20px;
        font-family: PingFang SC Heavy;
      }
      .banner-text {
        height: 30px;
        line-height: 30px;
        color: #fff;
        font-size: 12px;
        font-family: PingFang SC Bold;
      }
    }
    // }
  }
  .mian {
    padding: 0 12px;
    .content {
      width: 100%;
      min-height: 106px;
      border-radius: 10px;
      background-color: #fff;
      box-shadow: 0px 8px 30px 0px rgba(0, 0, 0, 0.02);
      padding: 12px;
      display: flex;
      flex-direction: column;
      margin-top: -20px;

      .left {
        width: 82px;
        height: 82px;
        margin-right: 12px;
        // background: #f9f9f9;
        border-radius: 5px;
        .img {
          width: 82px;
          height: 82px;
        }
      }
      .right {
        flex: 1;
        color: #3d3d3d;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        .title {
          font-family: PingFang SC Bold;
          font-size: 14px;
          line-height: 18px;
        }
        // .text {
        //   width: 100%;
        //   font-family: PingFang SC Medium;
        //   color: #9d9d99;
        //   font-size: 14px;
        //   line-height: 18px;
        //   display: flex;
        //   .taocaies {
        //     width: 45px;
        //     height: 30px;
        //   }
        //   .taocai {
        //     width: 200px;
        //   }
        // }
        .rang-date {
          display: flex;
          justify-content: space-between;
          align-items: center;
          color: #9d9d99;
          font-size: 12px;
          font-family: PingFang SC Medium;
          padding-right: 12px;
          .num {
            // margin-left: auto;
          }
        }
        .all-rang {
          min-width: 210px;
          color: #3d3d3d;
          font-family: PingFang SC Medium;
          font-size: 14px;
          font-weight: normal;
          line-height: 20px;
          margin-top: 6px;
          display: flex;
          justify-content: flex-end;
          .rangnum {
            font-family: DINPro-Bold;
            font-size: 18px;
            font-weight: bold;
            line-height: 21px;
            letter-spacing: 0em;
          }
        }
      }
    }
    .contentes {
      width: 100%;
      min-height: 100px;
      background-color: #fff;
      box-shadow: 0px 8px 30px 0px rgba(0, 0, 0, 0.05);
      border-radius: 10px;
      margin-top: 12px;
      padding-bottom: 10px;
      .table-header {
        width: 100%;
        height: 44px;
        text-align: center;
        line-height: 44px;
        font-family: PingFang SC Bold;
        color: #157afe;
      }
    }
  }

  ::v-deep .uni-table-td {
    font-size: 10px !important;
    border-bottom: none;
    &:nth-child(2n-1) {
      background-color: #f3f8ff;
    }
  }
  ::v-deep .uni-table-th {
    font-size: 10px !important;
    // opacity: 0.1;
    color: #3d3d3d;
    &:nth-child(2n) {
      background-color: #b9d7ff;
    }
    &:nth-child(2n-1) {
      background-color: #a8cdff;
    }
  }
}
</style>
